<?php
declare (strict_types = 1);

namespace app\api\controller;

use app\BaseController;
use app\common\model\Product\Product as ProductModel;
use app\common\model\Product\Type as TypeModel;


class Home extends BaseController
{
    public function index()
    {
        $TypeList = TypeModel::limit(8)->order('weigh','desc')->select();

        $RecomList = ProductModel::where(['flag' => 3])->limit(4)->select();

        $data = [
            'TypeList' => $TypeList,
            'RecomList' => $RecomList
        ];

        $this->success('查询成功',null,$data);
    }

    

}
